<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
    <div class="container-fluid">
        <div class="row">

            <main role="main" class="col-md-12 ml-sm-auto col-lg-12 pt-3 px-4">
                <form id="search" action="/elastic/elasticsearchTemplateQuery" method="get">
                    <input type="text" name="key" th:value="${key}"/>
                    <input type="hidden" name="index" value="1"/>
                    <button class="btn btn-default btn-search" type="submit">搜索</button>
                </form>
                <div class="table-responsive">
                    <table class="table table-striped table-sm">
                        <thead>
                        <tr>
                            <th>id</th>
                            <th>firstCode</th>
                            <th>secordCode</th>
                            <th>content</th>
                            <th>类型</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="emp:${list}">
                            <td th:text="${emp.id}"></td>
                            <td th:text="${emp.firstCode}"></td>
                            <td th:text="${emp.secordCode}"></td>
                            <td th:utext="${emp.content}"></td>
                            <td th:text="${emp.type}==0?'女':'男'"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </main>
        </div>
    </div>

</body>
</html>